<h1>New incident</h1>

<%= error_messages_for :incident %>

<% form_for(:incident, :url => incidents_path) do |f| %>
  <p>
    <b>Type d'incident</b><br />
    <%= f.text_field :kind %>
  </p>

  <p>
    <b>D&eacute;tails</b><br />
    <%= f.text_field :data %>
  </p>

  <p>
    <b>Machine</b><br />
    <%= f.select :box_id, (Box.find :all).collect { |box| [box.name, box.id] } %>
  </p>

  <p>
    <%= submit_tag "Cr&eacute;er" %>
  </p>
<% end %>

<%= link_to 'Retour aux incidents', incidents_path %>